package com.example.productserver.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

/**
 * @author benjamin_5
 * @Description
 * @date 2023/2/20
 */
@Component
@ConfigurationProperties(prefix = "cloud7day.product")
@Data
@RefreshScope
public class Cloud7DayProperties {

    private String name;
    private BigDecimal price;
    private Integer type;

    @Override
    public String toString() {
        return "Cloud7DayProperties{" +
                "name='" + name + '\'' +
                ", price=" + price +
                ", type=" + type +
                '}';
    }
}
